﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Ubatic.UI.Code
{
    public class Navigation
    {
        public static void NavigateTo(string relativeUrl)
        {
            HttpContext.Current.Response.Redirect(HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority + relativeUrl, true);
        }

        public static long UserId
        {
            get
            {
                return Convert.ToInt64(HttpContext.Current.Session["UserId"]);
            }
            set
            {
                HttpContext.Current.Session["UserId"] = value;
            }
        }

    }
}